home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / mac / macimf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-16  |  2.2 KB  |  54 lines  |  [TEXT/KAHL]

  1. /* Definitions of Mac-specific data about image families in Xconq.
  2.    Copyright (C) 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. Xconq is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.  See the file COPYING.  */
  8.  
  9. /* Structure containing the Mac-specific parts of an image in an image family. */
  10.  
  11. typedef struct a_mac_image {
  12.     Image *generic;                    /* pointer back to generic image */
  13.     int patdefined;                    /* true if mono pattern data is defined */
  14.     Pattern monopat;                /* mono pattern data */
  15.     Handle monosicn;                /* 16x16 mono icon */
  16.     Handle masksicn;                /* 16x16 mask icon */
  17.     Handle monoicon;                /* 32x32 mono icon */
  18.     Handle maskicon;                /* 32x32 mask icon */
  19.     Handle colricon;                /* color icon (can be any size) */
  20.     PixPatHandle colrpat;            /* color pattern (can be 8x8 up to 64x64) */
  21.     /* (should implement all of the following) */
  22.     PicHandle monopict;                /* mono picture */
  23.     PicHandle colrpict;                /* color picture */
  24.     PicHandle maskpict;                /* mask picture */
  25.     PicHandle groupmonopict;        /* mono group picture */
  26.     PicHandle groupcolrpict;        /* color group picture */
  27.     PicHandle groupmaskpict;        /* mask group picture */
  28.     int groupmonox, groupmonoy;        /* Position of mono image in a group picture */
  29.     int groupcolrx, groupcolry;        /* Position of mono image in a group picture */
  30.     int groupmaskx, groupmasky;        /* Position of mono image in a group picture */
  31. } MacImage;
  32.  
  33. #if 0 /* correct way */
  34. #define SET_IMG_PAT(mimg,i,val) (mimg->monopat.pat[(i)] = (val))
  35. #else /* dangerous way */
  36. #define SET_IMG_PAT(mimg,i,val) (mimg->monopat[(i)] = (val))
  37. #endif
  38.  
  39. #define c2p(STR,PBUF) \
  40.   strcpy(((char *) PBUF) + 1, STR);  \
  41.   PBUF[0] = strlen(STR);
  42.  
  43. #define p2c(PSTR,BUF)  \
  44.   strncpy(BUF, ((char *) (PSTR) + 1), PSTR[0]);  \
  45.   BUF[PSTR[0]] = '\0';
  46.  
  47. extern MacImage *init_mac_image(Image *img);
  48. extern MacImage *get_mac_image(Image *img);
  49. extern void mac_load_imf(ImageFamily *imf);
  50. extern void mac_interp_imf(ImageFamily *imf);
  51. extern void mac_interp_bytes(Obj *datalist, int numbytes, Handle desthandle, int jump);
  52. extern void make_generic_image_data(ImageFamily *imf);
  53. extern void mac_load_image_color(ImageColor *imc);
  54.